package com.project.service.impl.backend.basic;

import java.util.List;

import com.project.dao.RoleDao;
import com.project.dao.bean.Limits;
import com.project.dao.bean.Role;
import com.project.service.backend.basic.RoleService;

/**
 * 后台角色管理 Service Impl
 * @author Sn
 *
 */
public class RoleServiceImpl implements RoleService 
{
	
	private RoleDao roleDao;
	
	public void setRoleDao(RoleDao roleDao) 
	{
		this.roleDao = roleDao;
	}

	@Override
	public int save(Role role) throws Exception 
	{
		return roleDao.save(role);
	}

	@Override
	public void update(Role role) throws Exception 
	{
		roleDao.update(role);
	}

	@Override
	public void delete(Role role) throws Exception 
	{
		roleDao.delete(role);
	}

	@Override
	public List<Role> findRoleBypg(Role role) throws Exception 
	{
		return roleDao.getRole(role);
	}

	@Override
	public Role getRoleById(Role role) throws Exception 
	{
		return roleDao.getRoleById(role);
	}

	@Override
	public List<Role> findRole() throws Exception 
	{
		return roleDao.getRole();
	}

	@Override
	public List<Limits> getRoleLimit(Role role) throws Exception 
	{
		return roleDao.getRoleLimit(role);
	}

}
